package com.training.bt.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.training.bt.common.PageResponseDTO;
import com.training.bt.entity.DownloadHistory;
import com.training.bt.service.DownloadHistoryService;

import lombok.RequiredArgsConstructor;

@RestController
@RequiredArgsConstructor
@RequestMapping("/api/downloadRecord")
public class DownloadHistoryController {
    private final DownloadHistoryService downloadHistoryService;

    @GetMapping("/list")
    public PageResponseDTO<DownloadHistory> getList(
        @RequestParam int page,
        @RequestParam int size
    ){
        return downloadHistoryService.getDownloadHistoryList(page, size);
    }
}
